Unit 4 Exercise 6
Exercise 6: SubSchedule - Multiple Runs
Objective
To create a schedule that utilizes a sub-schedule called by multiple container jobs.
Summary
Create a Sub-Schedule named SS-Repeating with an Instance Definition called RUNTIME with a values of 10. This Sub-Schedule will have 5 Windows jobs that run in a sequential chain.
Example: Job 1 → Job 2 → Job 3 → Job 4 → Job 5
Create a Schedule named Repeating Schedule. This schedule will contain 4 container jobs that each will call the sub-schedule and will run at specified times during the day.
Instructions
Create the Sub-Schedule
- In Library > Administration, select on Master Schedules.
- Click the Add button.
- On Master Schedule Definition screen:
- In the Name field, enter
SS-Repeating
. - In the Documentation field, enter some documentation
- Example: This is the Daily Sub-Schedule.
- In the Schedule Settings frame, mark the SubSchedule checkbox.
- Saturday and Sunday are working days.
- This sub-schedule doesn't use the Master Holiday Calendar
- Click the Save button.
- Click Back
Add Jobs to the SubSchedule
- In Studio, select SS-Repeating.
- Click the View button.
- Select Add Job in the side menu.
- On the Master Job Definition screen:
- In the Name textbox, enter
Job 1
. - In the Job Type dropdown, select Windows.
- In the Machine Selection dropdown, select the SMATraining.
- In the User ID dropdown, select SMATRAINING\SMAUSER.
- In the Command Line field, type:
"[[PATH_Windows]]\genericp.exe" -t[[RUNTIME]]
- Click the Save.
- Click the Lock icon in the upper right-hand corner.
- Scroll to and expand the Frequency box.
- Within the Frequency box, select Example-Mon-Sun-O in the Inactive list and move it to the Active list.
- Click the Save button.
- Click Back.
- Utilizing the Copy function, copy Job 1 until you have 5 jobs total.
- Create Dependencies between the 5 jobs so they run in a sequential chain.
- Job 1 → Job 2 → Job 3 → Job 4 → Job 5
Create the Primary Schedule
- In Library > Administration, select on Master Schedules.
- Click the Add button.
- In the Name field, enter
Repeating Schedule
. - In the Documentation field, enter some documentation
- Example: This is the Primary Schedule for the Repeating SubSchedule example.
- Saturday and Sunday are NOT working days.
- This sub-schedule does use the Master Holiday Calendar
- Click the Save button.
- Click Back.
Add the Container Job to the Schedule
- In Studio, using the filter locate and select Repeating Schedule.
- Click the View button.
- Select Add Job in the side menu.
- On the Job Master Definition screen:
- In the Name textbox, enter
0700 Job
. - In the Job Type dropdown list, select Container.
- On the Master SubSchedule dropdown list select SS-Repeating.
- Click the Save button.
- Click the Lock icon in the upper right-hand corner.
- Expand the Documentation box and enter in some documentation.
- Example: **This is a container Job that has the Daily Jobs.
- Scroll to and expand the Frequency box.
- Within the Frequency box, select
Mon-Fri-N
in the Inactive list and move it to the Active list. - Select the Active Frequency.
- Scroll down to the Offset Information, in the Start Offset field, enter
07:00
. - Click the Save button.
- Click Back.
- Utilizing the Copy function, copy the 0700 Job until you have a 1000 Job, 1400 Job, and 1900 Job.
- Edit each of the copied jobs to modify the Frequency Information so the Start Offset matches the time in the job name.
- Example: 1000 Job would have a Start Offset of
10:00
.
Build the Schedule
- Build the Repeating Schedule for today and allow it to run.
- Valdiate that the jobs in one of the 4 sub-schedules run successfully.
Enterprise Manager
Details
Create the SubSchedule
- Under the Administration topic, Double-Click on Schedule Master.
- Click the Add button on the Schedule Master toolbar.
- In the Name textbox, enter SS-Repeating.
- In the Documentation textbox, enter This is the Daily SubSchedule.
- In the Start Time box, notice the default of
00:00
(midnight). - Keep the defaults selected for the Workdays per Week for the Schedule to run.
- In the Schedule Properties frame, mark the SubSchedule checkbox.
- Click the Save button on the Schedule Master toolbar.
- Click the Instance Definition tab and type the Instance in the Define Property Values field:
RUNTIME=10
- Press the Add button
- Save the SS-Repeating and close the Schedule Master tab.
Add Jobs to the SubSchedule
- Under the Administration topic, Double-Click on Job Master.
- Select the SS-Repeating Schedule.
- Click the Add button on the Job Master toolbar.
- In the Name textbox, enter Daily Job 1.
- In the Job Type drop-down list, select Windows.
- In the Primary Machine drop-down list, select the SMATraining machine.
- In the User ID drop-down list, select
SMATRAINING\SMAUSER
. - In the Command Line, type Ctrl+F and select the command line that looks like this:
"[[MI.PathWindows]]\genericp.exe" -t[[RUNTIME]] -e0
- Click the Save button on the Job Master toolbar.
- Click the Frequency tab.
- Within the Frequency list frame, click the Add button.
- Click inside the option button to Use existing Frequency.
- In the Frequency drop-down list, select Mon-Fri-N.
- Click Next.
- Click the Finish button.
- Add Documentation to the Job.
- On the Job Master toolbar, be sure you have the SS-Repeating selected and click the Copy button or press Ctrl+Insert.
- Name the Job Daily Job 2.
- Click OK.
- Change the Documentation if needed.
- Repeat steps 27 to 30 to create Jobs Daily Job 3, Daily Job 4, and Daily Job 5.
- Close the Job Master tab and use Workflow Designer to create Dependencies.
- Close the Workflow Designer tab when finished.
Create the Primary Schedule
- Under the Administration topic, Double-Click on Schedule Master.
- Click the Add button on the Schedule Master toolbar.
- In the Name textbox, enter Repeating Schedule.
- In the Documentation textbox, enter This is the Primary Schedule for the Repeating SubSchedule example.
- In the Start Time box, notice the default of
00:00
(midnight). - Keep the default selected for the Workdays per Week for the Schedule to run.
- Click the Save button on the Schedule Master toolbar.
- Close the Schedule Master tab.
Add the SubSchedule as a Container Job into the Primary Schedule
- Under the Administration topic, Double-Click on Job Master.
- Select the Repeating Schedule from the Schedule drop-down list.
- Click the Add button on the Job Master toolbar.
- In the Name textbox, enter 0700 Job.
- In the Job Type drop-down list, select Container.
- On the Schedule to run as SubSchedule drop-down list select the SS-Repeating.
- Click the Save button on the Job Master toolbar.
- Click the Frequency tab.
- Within the Frequency list frame, click the Add button.
- Click inside the option button to Use existing Frequency.
- In the Frequency drop-down list, select Mon-Fri-N.
- Click Next and then Finish.
- In the Start Offset box, enter
07:00
. - Click the Save button on the Job Master toolbar.
- Click the Documentation tab.
- In the Documentation textbox, enter This is a container Job that has the Daily Jobs.
- Click the Save button on the Job Master toolbar.
- Still on the Job Master Toolbar, click the Copy button.
- Name the Job 1000 Job.
- Click OK.
- Click the Frequency tab.
- Update the Start Offset box to
10:00
and Save the Job. - Repeat steps 59 to 63 creating a 1400 Job and a 1900 Job running at
2 pm
and7 pm
. You will need to change the Start Offset for these Jobs. Change the Documentation if needed. - Close all tabs.
Build the Schedule
- Under the Operation topic, Double-Click Schedule Build.
- Is the SubSchedule visible? Why?
- Click the Repeating Schedule and click the Build button.
- On the Build Properties screen, leave On Hold selected and click OK. This will build the Schedule for today only.
- Close the Build Schedules screen.
- Under Operations, open the List or Matrix view or use Solution Manager to check the results.
- Release the Schedule and let the Jobs run.